<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>空间转换-平移</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    .box {
      margin: 150px 50px;
      width: 600px;
      height: 200px;
      border: 2px solid #f00;
      /* 视距 500 - 1000 */
      perspective: 1000px;
    }

    .move {
      width: 200px;
      height: 100%;
      background-color: #00f;
      transition: all 1s;
    }

    .box:hover .move {
      transform: translate3d(320px, 0, 300px);
    }
  </style>
</head>

<body>
  <div class="box">
    <div class="move"></div>
  </div>
</body>

</html>

<!-- 
perspective 视距
可以给元素添加透视效果

-->